//
//  UIImage+MPCActionSheet.m
//  MPCActionSheet
//
//  Created by macRong on 08/28/2017.
//  Copyright (c) 2017 jxzjxz. All rights reserved.
//

#import "UIImage+MPCActionSheet.h"

@implementation UIImage (MPCActionSheet)

+ (instancetype)MPC_imageWithColor:(UIColor *)color
{
    CGRect rect = CGRectMake(0.0f, 0.0f, 2.0f, 2.0f);
    UIGraphicsBeginImageContext(rect.size);
    CGContextRef context = UIGraphicsGetCurrentContext();
    CGContextSetFillColorWithColor(context, [color CGColor]);
    CGContextFillRect(context, rect);
    UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    
    return image;
}

@end
